package com.example.xpagedemoproject.fragment;

import com.xuexiang.xpage.annotation.Page;
import com.xuexiang.xpage.base.XPageSimpleListFragment;

import java.util.List;

@Page(name = "测试PopBack")
public class PopBackFragment extends XPageSimpleListFragment {
    @Override
    protected List<String> initSimpleData(List<String> lists) {
        lists.add("AddToBackStack = false");
        lists.add("AddToBackStack = true");
        return lists;
    }

    @Override
    protected void onItemClick(int position) {
        switch (position) {
            case 0:
                openPage(PopBackFragment.class,false);
                break;
            case 1:
                openPage(PopBackFragment.class,true);
                break;
            default:
                break;
        }
    }
}
